﻿#region Using directives

using System;
using System.Collections;
using System.Data;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.MD.Runtime.Implement;

#endregion

namespace UFIDA.U9.Cust.HWProject.CreateAPBillHead.CreateAPBilListUIModel
{
	[Serializable]
	public partial class CreateAPBilListUIModelModel : UIModel
	{
		#region Constructor
		public CreateAPBilListUIModelModel() : base("CreateAPBilListUIModel")
		{
			InitClass();
			this.SetResourceInfo("44105e11-4868-45bc-9480-de83acbccf48");
            try{
			    AfterInitModel();
            }catch(Exception exception){
              IUIModel model = this;
		      this.ErrorMessage.SetErrorMessage(ref model,exception);
			}
		}

		//just for Clone 
		private CreateAPBilListUIModelModel(bool isInit) : base("CreateAPBilListUIModel")
		{}
		protected override IUIModel CreateCloneInstance()
		{
			return new CreateAPBilListUIModelModel(false);
		}
		#endregion
		#region member
		#region views
		private APbilHeadView viewAPbilHead;			
		private APbilHead_APbilLineView viewAPbilHead_APbilLine;			
		#endregion
		
		#region links
		//private IUILink linkAPbilHead__APbilHead_APbilLine;			
		#endregion
		
		#region properties
		#endregion
		#endregion

		#region property
		public APbilHeadView APbilHead
		{
			get { return (APbilHeadView)this["APbilHead"]; }
		}
		public APbilHead_APbilLineView APbilHead_APbilLine
		{
			get { return (APbilHead_APbilLineView)this["APbilHead_APbilLine"]; }
		}
		
		#region RealViews
		#endregion
		
	
		#endregion

		#region function
		private void InitClass()
		{
			this.viewAPbilHead = new APbilHeadView(this);
			this.viewAPbilHead.SetResourceInfo("a44772e2-b009-422e-8e6c-3475c5b2fd30");
			this.Views.Add(this.viewAPbilHead);			
			this.viewAPbilHead_APbilLine = new APbilHead_APbilLineView(this);
			this.viewAPbilHead_APbilLine.SetResourceInfo("2dc6764f-a780-46f0-b0f5-5bd264872e80");
			this.Views.Add(this.viewAPbilHead_APbilLine);			

			//this.linkAPbilHead__APbilHead_APbilLine
			{
			IUILink link = new UILink("APbilHead__APbilHead_APbilLine",this,this.viewAPbilHead.FieldID,this.viewAPbilHead_APbilLine.FieldAPbilHead,EnumAssociationKind.COMPOSITION,EnumAssociationDirection.Double,EnumCardinality.ONE,EnumCardinality.MORE,"APbilLine");
			this.Links.Add(link);
			}
			//this.linkAPbilHead__APbilHead_APbilLine.ChildKeyConstraint.UpdateRule = Rule.None;
			//this.linkAPbilHead__APbilHead_APbilLine.ChildKeyConstraint.DeleteRule = Rule.None;
			//this.linkAPbilHead__APbilHead_APbilLine.ChildKeyConstraint.AcceptRejectRule = AcceptRejectRule.None;
			
		}

		public override string AssemblyName
		{
			get { return "UFIDA.U9.Cust.HWProject.CreateAPBillHead.CreateAPBilListUI"; }
		}
		
		#endregion
		private void OnValidate_DefualtImpl()
    {
    }

	}


	[Serializable]
	public partial class APbilHeadView : UIView
	{
		#region Constructor
		public APbilHeadView(IUIModel model) : base(model,"APbilHead","UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APbilHead", true)
		{
			InitClass();
		}
		//构造空实例,不进行初始化.目前为Clone使用.
		private APbilHeadView():base(null,"APbilHead","UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APbilHead", true)
		{
		}
		protected override IUIView CreateCloneInstance()
		{
			return new APbilHeadView();
		}
		#endregion

		#region fiels property filter
		public IUIField FieldID
		{
			get { return this.Fields["ID"]; }
		}
		public IUIField FieldCreatedOn
		{
			get { return this.Fields["CreatedOn"]; }
		}
		public IUIField FieldCreatedBy
		{
			get { return this.Fields["CreatedBy"]; }
		}
		public IUIField FieldModifiedOn
		{
			get { return this.Fields["ModifiedOn"]; }
		}
		public IUIField FieldModifiedBy
		{
			get { return this.Fields["ModifiedBy"]; }
		}
		public IUIField FieldSysVersion
		{
			get { return this.Fields["SysVersion"]; }
		}
		public IUIField FieldOrg
		{
			get { return this.Fields["Org"]; }
		}
		public IUIField FieldDocNo
		{
			get { return this.Fields["DocNo"]; }
		}
		public IUIField FieldAccrueBy
		{
			get { return this.Fields["AccrueBy"]; }
		}
		public IUIField FieldSrcDocNo
		{
			get { return this.Fields["SrcDocNo"]; }
		}
		public IUIField FieldAC
		{
			get { return this.Fields["AC"]; }
		}
		public IUIField FieldDocType
		{
			get { return this.Fields["DocType"]; }
		}
		public IUIField FieldInvoiceNum
		{
			get { return this.Fields["InvoiceNum"]; }
		}
		public IUIField FieldInvoiceDate
		{
			get { return this.Fields["InvoiceDate"]; }
		}
		public IUIField FieldPaySupp
		{
			get { return this.Fields["PaySupp"]; }
		}
		public IUIField FieldSupplierCode
		{
			get { return this.Fields["SupplierCode"]; }
		}
		public IUIField FieldBusinessDate
		{
			get { return this.Fields["BusinessDate"]; }
		}
		public IUIField FieldAccrueDate
		{
			get { return this.Fields["AccrueDate"]; }
		}
		public IUIField FieldSrcSystemType
		{
			get { return this.Fields["SrcSystemType"]; }
		}
		public IUIField FieldIsSuccess
		{
			get { return this.Fields["IsSuccess"]; }
		}
		public IUIField FieldOrderStatus
		{
			get { return this.Fields["OrderStatus"]; }
		}
		public IUIField FieldErroMsg
		{
			get { return this.Fields["ErroMsg"]; }
		}


		[Obsolete("请使用CurrentFilter属性，这个方法有可能会导致强弱类型转换出错")]
		public APbilHeadDefaultFilterFilter DefaultFilter
		{
			get { return (APbilHeadDefaultFilterFilter)this.CurrentFilter; }
		}
		#endregion

		#region Init
		private void InitClass()
		{
			UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "ID", true,true, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","39183a01-9f90-4a22-a80d-350dc15a29b0");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedOn", typeof(DateTime), true,"","System.DateTime", "CreatedOn", true,true, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","eb4319ab-e814-470b-ab28-dce0a63399a3");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedBy", typeof(String), true,"","System.String", "CreatedBy", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","46b60a7f-aeba-42a2-85e3-7b01bda516fe");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedOn", typeof(DateTime), true,"","System.DateTime", "ModifiedOn", true,true, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","00d53db5-2166-4c8a-889e-d12c3113f6da");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedBy", typeof(String), true,"","System.String", "ModifiedBy", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","50318148-bb5c-4a3a-86e4-9fa0bb57c4ec");
			UIModelRuntimeFactory.AddNewUIField(this,"SysVersion", typeof(Int64), true,"0","System.Int64", "SysVersion", true,true, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","9995d574-bf1d-4f79-9da5-460e9c9f14cb");
			UIModelRuntimeFactory.AddNewUIField(this,"Org", typeof(String), true,"","System.String", "Org", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","f0e1b002-556f-4dbe-bb0a-f2b628ed8e3d");
			UIModelRuntimeFactory.AddNewUIField(this,"DocNo", typeof(String), true,"","System.String", "DocNo", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","b46f1b8b-84ed-499b-bd3b-52427dca9662");
			UIModelRuntimeFactory.AddNewUIField(this,"AccrueBy", typeof(String), true,"","System.String", "AccrueBy", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","067d6bea-d334-4cc7-a701-199eb2291245");
			UIModelRuntimeFactory.AddNewUIField(this,"SrcDocNo", typeof(String), true,"","System.String", "SrcDocNo", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","2d634021-d2be-45fd-8cf9-7128bb3aee8f");
			UIModelRuntimeFactory.AddNewUIField(this,"AC", typeof(String), true,"","System.String", "AC", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","442cb01e-65b9-422e-a463-f681ef8b47a6");
			UIModelRuntimeFactory.AddNewUIField(this,"DocType", typeof(String), true,"","System.String", "DocType", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","d522488d-79d1-4d44-9c7a-147834aa6982");
			UIModelRuntimeFactory.AddNewUIField(this,"InvoiceNum", typeof(String), true,"","System.String", "InvoiceNum", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","1474d6ad-302c-4ef7-ab75-e3472590e01d");
			UIModelRuntimeFactory.AddNewUIField(this,"InvoiceDate", typeof(String), true,"","System.String", "InvoiceDate", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","2862bd25-a7c7-4e14-a440-3cd7dd745f4f");
			UIModelRuntimeFactory.AddNewUIField(this,"PaySupp", typeof(String), true,"","System.String", "PaySupp", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","9a3a39df-ba64-40fc-ab54-d6c8318adf84");
			UIModelRuntimeFactory.AddNewUIField(this,"SupplierCode", typeof(String), true,"","System.String", "SupplierCode", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","8888c3a9-44d6-4355-98e3-ea3bbeb93170");
			UIModelRuntimeFactory.AddNewUIField(this,"BusinessDate", typeof(String), true,"","System.String", "BusinessDate", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","5189696a-621c-46e3-920a-af1ffea6e690");
			UIModelRuntimeFactory.AddNewUIField(this,"AccrueDate", typeof(String), true,"","System.String", "AccrueDate", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","07532783-0a1f-481a-b018-0c813a904a3a");
			UIModelRuntimeFactory.AddNewUIField(this,"SrcSystemType", typeof(String), true,"","System.String", "SrcSystemType", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","7ea11463-7772-44dd-b30d-1626d81c9329");
			UIModelRuntimeFactory.AddNewUIField(this,"IsSuccess", typeof(Boolean), true,"false","System.Boolean", "IsSuccess", true,true, false, "",false,(UIFieldType)1,"5efeea06-cae7-4cc0-82e9-20a789e4e582","e2a2b6b7-5b45-4af6-b8e9-974f64532351");
			UIModelRuntimeFactory.AddNewUIField(this,"OrderStatus", typeof(Int32), true,"0","UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APBilOrderStatusEnum", "OrderStatus", true,true, false, "",false,(UIFieldType)2,"ee5e4b69-cd72-4b19-83c6-7b9e9ab8014b","21538101-cace-47b9-9deb-e33c66b3a32c");
			UIModelRuntimeFactory.AddNewUIField(this,"ErroMsg", typeof(String), true,"","System.String", "ErroMsg", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","32f4def5-c733-460e-b87a-eddd533d1b5a");


			this.CurrentFilter = new APbilHeadDefaultFilterFilter(this);
		}
		#endregion
		
		#region override method
		protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
		{
			return new APbilHeadRecord(builder);
		}
		#endregion

		#region new method
		public new APbilHeadRecord FocusedRecord
		{
			get { return (APbilHeadRecord)base.FocusedRecord ; }
			set { base.FocusedRecord = value ; }
		}
		public new APbilHeadRecord AddNewUIRecord()
		{	
			return (APbilHeadRecord)base.AddNewUIRecord();
		}
		public new APbilHeadRecord NewUIRecord()
		{	
			return (APbilHeadRecord)base.NewUIRecord();
		}
		#endregion 

	}

	[Serializable]
	public class APbilHeadRecord : UIRecord
	{
		#region Constructor
		public APbilHeadRecord(IUIRecordBuilder builder):base(builder)
		{
		}
		private APbilHeadView uiviewAPbilHead
		{
			get { return (APbilHeadView)this.ContainerView; }
		}
		protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
		{
			return new APbilHeadRecord(builder);
		}
		#endregion

		#region property
		
		
		public  Int64 ID
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldID] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewAPbilHead.FieldID);
			}
			set{
				this[this.uiviewAPbilHead.FieldID] = value;
			}
		}
		
		
		public  DateTime? CreatedOn
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldCreatedOn] ;
				//return (DateTime?)value;
				return GetValue<DateTime?>(this.uiviewAPbilHead.FieldCreatedOn);
			}
			set{
				this[this.uiviewAPbilHead.FieldCreatedOn] = value;
			}
		}
		
		
		public  String CreatedBy
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldCreatedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldCreatedBy);
			}
			set{
				this[this.uiviewAPbilHead.FieldCreatedBy] = value;
			}
		}
		
		
		public  DateTime? ModifiedOn
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldModifiedOn] ;
				//return (DateTime?)value;
				return GetValue<DateTime?>(this.uiviewAPbilHead.FieldModifiedOn);
			}
			set{
				this[this.uiviewAPbilHead.FieldModifiedOn] = value;
			}
		}
		
		
		public  String ModifiedBy
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldModifiedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldModifiedBy);
			}
			set{
				this[this.uiviewAPbilHead.FieldModifiedBy] = value;
			}
		}
		
		
		public new Int64? SysVersion
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldSysVersion] ;
				//return (Int64?)value;
				return GetValue<Int64?>(this.uiviewAPbilHead.FieldSysVersion);
			}
			set{
				this[this.uiviewAPbilHead.FieldSysVersion] = value;
			}
		}
		
		
		public  String Org
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldOrg] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldOrg);
			}
			set{
				this[this.uiviewAPbilHead.FieldOrg] = value;
			}
		}
		
		
		public  String DocNo
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldDocNo] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldDocNo);
			}
			set{
				this[this.uiviewAPbilHead.FieldDocNo] = value;
			}
		}
		
		
		public  String AccrueBy
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldAccrueBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldAccrueBy);
			}
			set{
				this[this.uiviewAPbilHead.FieldAccrueBy] = value;
			}
		}
		
		
		public  String SrcDocNo
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldSrcDocNo] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldSrcDocNo);
			}
			set{
				this[this.uiviewAPbilHead.FieldSrcDocNo] = value;
			}
		}
		
		
		public  String AC
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldAC] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldAC);
			}
			set{
				this[this.uiviewAPbilHead.FieldAC] = value;
			}
		}
		
		
		public  String DocType
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldDocType] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldDocType);
			}
			set{
				this[this.uiviewAPbilHead.FieldDocType] = value;
			}
		}
		
		
		public  String InvoiceNum
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldInvoiceNum] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldInvoiceNum);
			}
			set{
				this[this.uiviewAPbilHead.FieldInvoiceNum] = value;
			}
		}
		
		
		public  String InvoiceDate
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldInvoiceDate] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldInvoiceDate);
			}
			set{
				this[this.uiviewAPbilHead.FieldInvoiceDate] = value;
			}
		}
		
		
		public  String PaySupp
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldPaySupp] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldPaySupp);
			}
			set{
				this[this.uiviewAPbilHead.FieldPaySupp] = value;
			}
		}
		
		
		public  String SupplierCode
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldSupplierCode] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldSupplierCode);
			}
			set{
				this[this.uiviewAPbilHead.FieldSupplierCode] = value;
			}
		}
		
		
		public  String BusinessDate
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldBusinessDate] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldBusinessDate);
			}
			set{
				this[this.uiviewAPbilHead.FieldBusinessDate] = value;
			}
		}
		
		
		public  String AccrueDate
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldAccrueDate] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldAccrueDate);
			}
			set{
				this[this.uiviewAPbilHead.FieldAccrueDate] = value;
			}
		}
		
		
		public  String SrcSystemType
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldSrcSystemType] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldSrcSystemType);
			}
			set{
				this[this.uiviewAPbilHead.FieldSrcSystemType] = value;
			}
		}
		
		
		public  Boolean? IsSuccess
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldIsSuccess] ;
				//return (Boolean?)value;
				return GetValue<Boolean?>(this.uiviewAPbilHead.FieldIsSuccess);
			}
			set{
				this[this.uiviewAPbilHead.FieldIsSuccess] = value;
			}
		}
		
		
		public  Int32? OrderStatus
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldOrderStatus] ;
				//return (Int32?)value;
				return GetValue<Int32?>(this.uiviewAPbilHead.FieldOrderStatus);
			}
			set{
				this[this.uiviewAPbilHead.FieldOrderStatus] = value;
			}
		}
		
		
		public  String ErroMsg
		{
			get{
				//object value = this[this.uiviewAPbilHead.FieldErroMsg] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead.FieldErroMsg);
			}
			set{
				this[this.uiviewAPbilHead.FieldErroMsg] = value;
			}
		}
		#endregion
	}
	
	[Serializable]
	public class APbilHeadDefaultFilterFilter : UIFilter
	{
		#region Constructor
		public APbilHeadDefaultFilterFilter(IUIView view) 
			: base("DefaultFilter",view,@"",@"")
		{
			InitClass();
		}
		//for Clone Constructor
		private APbilHeadDefaultFilterFilter()
			: base("DefaultFilter",null,"","")
		{}
		protected override IUIFilter CreateCloneInstance()
		{
			return new APbilHeadDefaultFilterFilter();
		}
		#endregion

		#region property
		#endregion
		
		#region function
		private void InitClass()
		{
		}
		#endregion

	}



	[Serializable]
	public partial class APbilHead_APbilLineView : UIView
	{
		#region Constructor
		public APbilHead_APbilLineView(IUIModel model) : base(model,"APbilHead_APbilLine","UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APbilLine", false)
		{
			InitClass();
		}
		//构造空实例,不进行初始化.目前为Clone使用.
		private APbilHead_APbilLineView():base(null,"APbilHead_APbilLine","UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APbilLine", false)
		{
		}
		protected override IUIView CreateCloneInstance()
		{
			return new APbilHead_APbilLineView();
		}
		#endregion

		#region fiels property filter
		public IUIField FieldID
		{
			get { return this.Fields["ID"]; }
		}
		public IUIField FieldCreatedOn
		{
			get { return this.Fields["CreatedOn"]; }
		}
		public IUIField FieldCreatedBy
		{
			get { return this.Fields["CreatedBy"]; }
		}
		public IUIField FieldModifiedOn
		{
			get { return this.Fields["ModifiedOn"]; }
		}
		public IUIField FieldModifiedBy
		{
			get { return this.Fields["ModifiedBy"]; }
		}
		public IUIField FieldSysVersion
		{
			get { return this.Fields["SysVersion"]; }
		}
		public IUIField FieldAPbilHead
		{
			get { return this.Fields["APbilHead"]; }
		}
		public IUIField FieldItemCode
		{
			get { return this.Fields["ItemCode"]; }
		}
		public IUIField FieldQty
		{
			get { return this.Fields["Qty"]; }
		}
		public IUIField FieldSrcDocNo
		{
			get { return this.Fields["SrcDocNo"]; }
		}
		public IUIField FieldSrcDocLineNo
		{
			get { return this.Fields["SrcDocLineNo"]; }
		}
		public IUIField FieldShipmentDate
		{
			get { return this.Fields["ShipmentDate"]; }
		}
		public IUIField FieldPrice
		{
			get { return this.Fields["Price"]; }
		}
		public IUIField FieldTaxSchedule
		{
			get { return this.Fields["TaxSchedule"]; }
		}
		public IUIField FieldWhCode
		{
			get { return this.Fields["WhCode"]; }
		}
		public IUIField FieldIsToSRM
		{
			get { return this.Fields["IsToSRM"]; }
		}
		public IUIField FieldPushCount
		{
			get { return this.Fields["PushCount"]; }
		}


		#endregion

		#region Init
		private void InitClass()
		{
			UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "ID", true,true, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","6320ebca-4673-4e27-add4-d23c12e0954e");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedOn", typeof(DateTime), true,"","System.DateTime", "CreatedOn", true,true, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","1165c2eb-1a3d-43eb-902b-784bacf6fcc5");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedBy", typeof(String), true,"","System.String", "CreatedBy", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","57b33295-a621-4743-afbe-8de3fe9be36e");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedOn", typeof(DateTime), true,"","System.DateTime", "ModifiedOn", true,true, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","a66ba074-cc26-4317-bd96-e161df102b97");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedBy", typeof(String), true,"","System.String", "ModifiedBy", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","fd1d3aa9-dc8b-40e6-b890-b84073bc0384");
			UIModelRuntimeFactory.AddNewUIField(this,"SysVersion", typeof(Int64), true,"0","System.Int64", "SysVersion", true,true, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","4ad9f13a-1268-466e-8f70-1e2b1ccbeeee");
			UIModelRuntimeFactory.AddNewUIField(this,"APbilHead", typeof(Int64), true,"","UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APbilHead", "APbilHead", true,true, false, "",false,(UIFieldType)4,"24387f44-1d1f-4fd3-b5e5-43fad8fae46e","95ef0428-d43e-496c-8b36-2c33b5f90e87");
			UIModelRuntimeFactory.AddNewUIField(this,"ItemCode", typeof(String), true,"","System.String", "ItemCode", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","50c40159-a1c5-4473-8a67-7c07ce5c5600");
			UIModelRuntimeFactory.AddNewUIField(this,"Qty", typeof(String), true,"","System.String", "Qty", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","ab88803c-74b1-4687-802c-8c7b6d0ea2c6");
			UIModelRuntimeFactory.AddNewUIField(this,"SrcDocNo", typeof(String), true,"","System.String", "SrcDocNo", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","2261a08e-971d-4ec6-8c76-2c4d2ebbb22b");
			UIModelRuntimeFactory.AddNewUIField(this,"SrcDocLineNo", typeof(String), true,"","System.String", "SrcDocLineNo", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","8409f0d7-1551-4360-a906-a736c08f392c");
			UIModelRuntimeFactory.AddNewUIField(this,"ShipmentDate", typeof(String), true,"","System.String", "ShipmentDate", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","d46555f5-254a-45f2-bc08-b096add2312b");
			UIModelRuntimeFactory.AddNewUIField(this,"Price", typeof(String), true,"","System.String", "Price", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","b29cca31-c0b6-4478-a60a-bf9a8c28cfea");
			UIModelRuntimeFactory.AddNewUIField(this,"TaxSchedule", typeof(String), true,"","System.String", "TaxSchedule", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","c0f49b99-0e24-43d0-ad25-fdcefb5c835d");
			UIModelRuntimeFactory.AddNewUIField(this,"WhCode", typeof(String), true,"","System.String", "WhCode", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","55e2886b-8bfc-49d6-8b8b-6ed9b8fe7206");
			UIModelRuntimeFactory.AddNewUIField(this,"IsToSRM", typeof(Boolean), true,"false","System.Boolean", "IsToSRM", true,true, false, "",false,(UIFieldType)1,"5efeea06-cae7-4cc0-82e9-20a789e4e582","efbf889e-9b06-4e86-bcdd-f862b209e4bb");
			UIModelRuntimeFactory.AddNewUIField(this,"PushCount", typeof(Int32), true,"0","System.Int32", "PushCount", true,true, false, "",false,(UIFieldType)1,"d7c6031e-d3fe-41aa-a397-5edd86c10cae","c3fb50d0-7611-475f-9948-b971b4c55d74");


		}
		#endregion
		
		#region override method
		protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
		{
			return new APbilHead_APbilLineRecord(builder);
		}
		#endregion

		#region new method
		public new APbilHead_APbilLineRecord FocusedRecord
		{
			get { return (APbilHead_APbilLineRecord)base.FocusedRecord ; }
			set { base.FocusedRecord = value ; }
		}
		public new APbilHead_APbilLineRecord AddNewUIRecord()
		{	
			return (APbilHead_APbilLineRecord)base.AddNewUIRecord();
		}
		public new APbilHead_APbilLineRecord NewUIRecord()
		{	
			return (APbilHead_APbilLineRecord)base.NewUIRecord();
		}
		#endregion 

	}

	[Serializable]
	public class APbilHead_APbilLineRecord : UIRecord
	{
		#region Constructor
		public APbilHead_APbilLineRecord(IUIRecordBuilder builder):base(builder)
		{
		}
		private APbilHead_APbilLineView uiviewAPbilHead_APbilLine
		{
			get { return (APbilHead_APbilLineView)this.ContainerView; }
		}
		protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
		{
			return new APbilHead_APbilLineRecord(builder);
		}
		#endregion

		#region property
		
		
		public  Int64 ID
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldID] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewAPbilHead_APbilLine.FieldID);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldID] = value;
			}
		}
		
		
		public  DateTime? CreatedOn
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldCreatedOn] ;
				//return (DateTime?)value;
				return GetValue<DateTime?>(this.uiviewAPbilHead_APbilLine.FieldCreatedOn);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldCreatedOn] = value;
			}
		}
		
		
		public  String CreatedBy
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldCreatedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead_APbilLine.FieldCreatedBy);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldCreatedBy] = value;
			}
		}
		
		
		public  DateTime? ModifiedOn
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldModifiedOn] ;
				//return (DateTime?)value;
				return GetValue<DateTime?>(this.uiviewAPbilHead_APbilLine.FieldModifiedOn);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldModifiedOn] = value;
			}
		}
		
		
		public  String ModifiedBy
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldModifiedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead_APbilLine.FieldModifiedBy);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldModifiedBy] = value;
			}
		}
		
		
		public new Int64? SysVersion
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldSysVersion] ;
				//return (Int64?)value;
				return GetValue<Int64?>(this.uiviewAPbilHead_APbilLine.FieldSysVersion);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldSysVersion] = value;
			}
		}
		
		
		public  Int64? APbilHead
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldAPbilHead] ;
				//return (Int64?)value;
				return GetValue<Int64?>(this.uiviewAPbilHead_APbilLine.FieldAPbilHead);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldAPbilHead] = value;
			}
		}
		
		
		public  String ItemCode
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldItemCode] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead_APbilLine.FieldItemCode);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldItemCode] = value;
			}
		}
		
		
		public  String Qty
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldQty] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead_APbilLine.FieldQty);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldQty] = value;
			}
		}
		
		
		public  String SrcDocNo
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldSrcDocNo] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead_APbilLine.FieldSrcDocNo);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldSrcDocNo] = value;
			}
		}
		
		
		public  String SrcDocLineNo
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldSrcDocLineNo] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead_APbilLine.FieldSrcDocLineNo);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldSrcDocLineNo] = value;
			}
		}
		
		
		public  String ShipmentDate
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldShipmentDate] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead_APbilLine.FieldShipmentDate);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldShipmentDate] = value;
			}
		}
		
		
		public  String Price
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldPrice] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead_APbilLine.FieldPrice);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldPrice] = value;
			}
		}
		
		
		public  String TaxSchedule
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldTaxSchedule] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead_APbilLine.FieldTaxSchedule);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldTaxSchedule] = value;
			}
		}
		
		
		public  String WhCode
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldWhCode] ;
				//return (String)value;
				return GetValue<String>(this.uiviewAPbilHead_APbilLine.FieldWhCode);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldWhCode] = value;
			}
		}
		
		
		public  Boolean? IsToSRM
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldIsToSRM] ;
				//return (Boolean?)value;
				return GetValue<Boolean?>(this.uiviewAPbilHead_APbilLine.FieldIsToSRM);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldIsToSRM] = value;
			}
		}
		
		
		public  Int32? PushCount
		{
			get{
				//object value = this[this.uiviewAPbilHead_APbilLine.FieldPushCount] ;
				//return (Int32?)value;
				return GetValue<Int32?>(this.uiviewAPbilHead_APbilLine.FieldPushCount);
			}
			set{
				this[this.uiviewAPbilHead_APbilLine.FieldPushCount] = value;
			}
		}
		#endregion
	}
	



}